var initUIEvents = function() {
	
	build.on('ehchanged', function() {
		$('#baseEH').text(parseInt(build.data.eh.base)); //  TODO faire des properties
		$('#selfBuffedEH').text(parseInt(build.data.eh.selfBuffed)); //  TODO faire des properties
		$('#groupBuffedEH').text(parseInt(build.data.eh.groupBuffed)); //  TODO faire des properties
	});

}

/*
 * Interface
 */

$('#inputHP').on('keyup', function(event) {
	build.Hp = $(this).val();
});

$('#inputDefenseRate').on('keyup', function(event) {
	build.DefenseRate = $(this).val();
});

/*
 * Engine
 */

var engine = new Engine();

engine.init();

var build = engine.getCurrentBuild();

initUIEvents();

/*
 * Tests
 */

build.ClassId = 0;
build.Hp = 1000;
build.Class.getBuff(0).Level = 0;
build.Class.getBuff(3).Level = 5;
console.log(build.data.eh);

/*
 * 
 */



